<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>初始Vue</title>
    <!--引入Vue-->
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<!--准备好一个容器-->
<div class="root">
    <h1>欢迎来到{{name}}学习</h1>
    <a href="http://www.atguigu.com" @click.prevent="showInfo">点我提示信息</a>

</div>


<script type="text/javascript">
    Vue.config.productionTip = false //阻止Vue在启动时生成生成提示

    new Vue({
        el:'.root',
        data:function () {
            return{
                name:'尚硅谷',
                address:'北京'
            }
        },
        methods:{
            showInfo(event){

                alert('同学你好')
            }
        }
    })


</script>
</body>
</html>